home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libgtop.idb / usr / freeware / include / glibtop / inodedb.h.z / inodedb.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  1.9 KB  |  68 lines

  1. /* Copyright (C) 1998-99 Martin Baulig
  2.    This file is part of LibGTop 1.0.
  3.  
  4.    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
  5.  
  6.    LibGTop is free software; you can redistribute it and/or modify it
  7.    under the terms of the GNU General Public License as published by
  8.    the Free Software Foundation; either version 2 of the License,
  9.    or (at your option) any later version.
  10.  
  11.    LibGTop is distributed in the hope that it will be useful, but WITHOUT
  12.    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13.    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14.    for more details.
  15.  
  16.    You should have received a copy of the GNU General Public License
  17.    along with LibGTop; see the file COPYING. If not, write to the
  18.    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.    Boston, MA 02111-1307, USA.
  20. */
  21.  
  22. #ifndef __GLIBTOP_INODEDB_H__
  23. #define __GLIBTOP_INODEDB_H__
  24.  
  25. #include <glibtop.h>
  26. #include <gdbm.h>
  27.  
  28. #define GLIBTOP_INODEDB_SYSTEM        1
  29. #define GLIBTOP_INODEDB_USER        2
  30. #define GLIBTOP_INODEDB_CACHE        4
  31.  
  32. #define GLIBTOP_INODEDB_ALL        7
  33.  
  34. BEGIN_LIBGTOP_DECLS
  35.  
  36. typedef struct _glibtop_inodedb        glibtop_inodedb;
  37.  
  38. typedef struct _glibtop_inodedb_key    glibtop_inodedb_key;
  39.  
  40. struct _glibtop_inodedb_key
  41. {
  42.     u_int64_t device, inode;
  43. };
  44.  
  45. struct _glibtop_inodedb
  46. {
  47.     GDBM_FILE system_dbf, user_dbf;
  48. };
  49.  
  50. #define glibtop_inodedb_open(p1,p2)    glibtop_inodedb_open_s(glibtop_global_server, p1, p2)
  51. #define glibtop_inodedb_lookup(p1,p2,p3) glibtop_inodedb_lookup_s(glibtop_global_server, p1, p2, p3)
  52. #define glibtop_inodedb_close(p1)    glibtop_inodedb_close_s(glibtop_global_server)
  53.  
  54. glibtop_inodedb *
  55. glibtop_inodedb_open_s (glibtop *server, unsigned databases, unsigned long cache_size);
  56.  
  57. const char *
  58. glibtop_inodedb_lookup_s (glibtop *server,
  59.               glibtop_inodedb *inodedb,
  60.               u_int64_t device, u_int64_t inode);
  61.  
  62. void
  63. glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb);
  64.  
  65. END_LIBGTOP_DECLS
  66.  
  67. #endif
  68.